package com.xbh.cron4j;

import com.jfinal.plugin.cron4j.ITask;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.util.Date;

/**
 * @MyITaskImpl:
 * @description:
 * @author: ZBoHang
 * @time: 2021/7/26 16:30
 */
public class MyITaskImpl implements ITask {

    @Override
    public void stop() {
        System.out.println("任务结束标志>>>>>");
    }

    @Override
    public void run() {

        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        System.out.println("现在时刻-->北京时间:" + LocalDateTime.now().format(dateTimeFormatter));
    }
}
